diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2016-12-22 14:46:21 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2016-12-27 12:52:44 -0800 |
commit | 2d7a5a9d71b91a4f60d949fce908d3765f6de1e9 (patch) | |
tree | f34d280cd377758087514851f7f6cc91d86a8a5e /alot | |
parent | 08dda117857f9e472e9ae5cdac035e5ee42dfb0a (diff) |
db/attachment: replace all caps name with PEP8 like name
Using file_ instead of FILE still avoids shadowing the builtin, but also
doesn't stand out so much.
Diffstat (limited to 'alot')
-rw-r--r-- | alot/db/attachment.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/alot/db/attachment.py b/alot/db/attachment.py index e192bba5..94c0f7ad 100644 --- a/alot/db/attachment.py +++ b/alot/db/attachment.py @@ -66,14 +66,14 @@ class Attachment(object): if os.path.isdir(path): if filename: basename = os.path.basename(filename) - FILE = open(os.path.join(path, basename), "w") + file_ = open(os.path.join(path, basename), "w") else: - FILE = tempfile.NamedTemporaryFile(delete=False, dir=path) + file_ = tempfile.NamedTemporaryFile(delete=False, dir=path) else: - FILE = open(path, "w") # this throws IOErrors for invalid path - self.write(FILE) - FILE.close() - return FILE.name + file_ = open(path, "w") # this throws IOErrors for invalid path + self.write(file_) + file_.close() + return file_.name def write(self, fhandle): """writes content to a given filehandle""" |