diff options
Diffstat (limited to 'pyload/cli/Cli.py')
-rw-r--r-- | pyload/cli/Cli.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/pyload/cli/Cli.py b/pyload/cli/Cli.py index 84725b625..cd3252220 100644 --- a/pyload/cli/Cli.py +++ b/pyload/cli/Cli.py @@ -214,7 +214,7 @@ class Cli(object): # clear old output if line < self.lastLowestLine: - for i in range(line + 1, self.lastLowestLine + 1): + for i in xrange(line + 1, self.lastLowestLine + 1): println(i, "") self.lastLowestLine = line @@ -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) |