diff options
author | Calum Lind <calumlind+deluge@gmail.com> | 2013-01-02 22:34:00 +0000 |
---|---|---|
committer | Calum Lind <calumlind+deluge@gmail.com> | 2013-01-02 22:40:37 +0000 |
commit | 61bd8aa15405d5582d67e01d3e8cdde634056344 (patch) | |
tree | df0f1c8a1661dc46ad52aba83e1b0c3117907351 | |
parent | 637578375c00d16ff3786f3cdd713940d8e22552 (diff) | |
download | deluge-61bd8aa15405d5582d67e01d3e8cdde634056344.tar.gz deluge-61bd8aa15405d5582d67e01d3e8cdde634056344.tar.bz2 deluge-61bd8aa15405d5582d67e01d3e8cdde634056344.zip |
Fix Gtk addtorrentdialog parent None error for single file torrents
-rw-r--r-- | deluge/ui/gtkui/addtorrentdialog.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/deluge/ui/gtkui/addtorrentdialog.py b/deluge/ui/gtkui/addtorrentdialog.py index 976f95eaa..b3f20109d 100644 --- a/deluge/ui/gtkui/addtorrentdialog.py +++ b/deluge/ui/gtkui/addtorrentdialog.py @@ -884,9 +884,10 @@ class AddTorrentDialog(component.Component): parent = self.files_treestore.iter_parent(itr) file_path = os.path.join(self.get_file_path(parent), new_text) # Don't rename if filename exists - for row in self.files_treestore[parent].iterchildren(): - if new_text == row[1]: - return + if parent: + for row in self.files_treestore[parent].iterchildren(): + if new_text == row[1]: + return if os.path.sep in new_text: # There are folders in this path, so we need to create them # and then move the file iter to top |