1
0
mirror of https://github.com/wting/autojump synced 2024-10-27 20:34:07 +00:00

explicit imports for NamedTemporaryFile

This commit is contained in:
William Ting 2013-05-14 21:58:23 -05:00
parent 57de0881da
commit 78e0bb2880

View File

@ -37,7 +37,7 @@ import os
import re import re
import shutil import shutil
import sys import sys
from tempfile import NamedTemporaryFile import tempfile
class Database: class Database:
""" """
@ -165,7 +165,9 @@ class Database:
if ((not os.path.exists(self.filename)) or if ((not os.path.exists(self.filename)) or
os.name == 'nt' or os.name == 'nt' or
os.getuid() == os.stat(self.filename)[4]): os.getuid() == os.stat(self.filename)[4]):
temp = NamedTemporaryFile(dir=self.config['data'], delete=False) temp = tempfile.NamedTemporaryFile(dir=self.config['data'],
delete=False)
for path, weight in sorted(self.data.items(), for path, weight in sorted(self.data.items(),
key=operator.itemgetter(1), key=operator.itemgetter(1),
reverse=True): reverse=True):