Opened 8 years ago
Closed 8 years ago
#2953 closed bug (Fixed)
code typo (ex -> e) in move_storage() preventing 'move storage' error from being proper logged
Reported by: | neon666 | Owned by: | Calum |
---|---|---|---|
Priority: | minor | Milestone: | 1.3.14 |
Component: | Core | Version: | 1.3.13 |
Keywords: | Cc: |
Description
Nothing happens when attempting to move storage under certain conditions. The error from deluged.log is below. I believe it is a simple typo - the last argument to log_error should be e (the error reported), not ex (which doesn't exist). The code snippet from torrent.py is also below.
The deluged.log generates this error:
Code highlighting:
[ERROR ] 10:50:08 rpcserver:304 Exception calling RPC request: global name 'ex' is not defined Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/deluge/core/rpcserver.py", line 299, in dispatch ret = self.factory.methods[method](*args, **kwargs) File "/usr/lib/python2.7/site-packages/deluge/core/core.py", line 411, in move_storage if not self.torrentmanager[torrent_id].move_storage(dest): File "/usr/lib/python2.7/site-packages/deluge/core/torrent.py", line 913, in move_storage self.torrent_id, dest, ex) NameError: global name 'ex' is not defined
Lines 906 - 914 in deluge/core/torrent.py, the 'ex' in the line next to last should be 'e':
Code highlighting:
if not os.path.exists(dest): try: # Try to make the destination path if it doesn't exist os.makedirs(dest) except OSError, e: log.error("Could not move storage for torrent %s since %s does " "not exist and could not create the directory: %s", self.torrent_id, dest, ex) return False
Change History (4)
comment:1 by , 8 years ago
Priority: | trivial → minor |
---|---|
Status: | new → pending |
Version: | other (please specify) → 1.3.13 |
comment:2 by , 8 years ago
Summary: | code typo preventing 'move storage' → code typo (ex -> e) in move_storage() preventing 'move storage' error from being proper logged |
---|
comment:3 by , 8 years ago
Milestone: | needs verified → 1.3.14 |
---|---|
Owner: | set to |
Status: | pending → accepted |
Note:
See TracTickets
for help on using tickets.
I ran into this myself today, found this bug report, can confirm the defect.
After correcting the typo and restarting deluged, the appropriate logs are actually error'd into the deluge log file (such as)
Version info:
Would be happy to fix into git (just not sure which branch to put it on)