#2953: code typo preventing 'move storage'
---------------------+------------------------------------
 Reporter:  neon666  |      Owner:
     Type:  bug      |     Status:  new
 Priority:  trivial  |  Milestone:  needs verified
Component:  Core     |    Version:  other (please specify)
 Keywords:           |
---------------------+------------------------------------
 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:
 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!default
   [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':
 {{{
 #!div style="font-size: 80%"
 Code highlighting:
   {{{#!python
       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
   }}}
 }}}

--
Ticket URL: <http://dev.deluge-torrent.org/ticket/2953>
Deluge <http://deluge-torrent.org/>
Deluge Project

-- 
You received this message because you are subscribed to the Google Groups 
"Deluge Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/deluge-dev.
For more options, visit https://groups.google.com/d/optout.

Reply via email to