summaryrefslogtreecommitdiffstats
path: root/pyload/cli/Cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/cli/Cli.py')
-rw-r--r--pyload/cli/Cli.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/pyload/cli/Cli.py b/pyload/cli/Cli.py
index 84725b625..a1f192bb3 100644
--- a/pyload/cli/Cli.py
+++ b/pyload/cli/Cli.py
@@ -321,9 +321,8 @@ class Cli(object):
print _("File does not exists.")
return
- f = open(join(owd, path), "rb")
- content = f.read()
- f.close()
+ with open(join(owd, path), "rb") as f:
+ content = f.read()
rid = self.client.checkOnlineStatusContainer([], basename(f.name), content).rid
self.printOnlineCheck(self.client, rid)