diff options
author | Slávek Banko <[email protected]> | 2023-01-19 18:01:26 +0100 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2023-01-20 13:05:37 +0900 |
commit | 94f5a3f12e1c61aa2f3cde2d7b260c08489336ac (patch) | |
tree | 9062a30a1d81a1a97e9397548e4ec48ae63c18a4 /mountconfig/SMBShareSelectDialog.py | |
parent | b9c0b6996a6da72f93baf50121a1be4a6fa48d2e (diff) | |
download | tde-guidance-94f5a3f12e1c61aa2f3cde2d7b260c08489336ac.tar.gz tde-guidance-94f5a3f12e1c61aa2f3cde2d7b260c08489336ac.zip |
Drop python2 support.
Signed-off-by: Slávek Banko <[email protected]>
Diffstat (limited to 'mountconfig/SMBShareSelectDialog.py')
-rw-r--r-- | mountconfig/SMBShareSelectDialog.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/mountconfig/SMBShareSelectDialog.py b/mountconfig/SMBShareSelectDialog.py index e97a577..617ee04 100644 --- a/mountconfig/SMBShareSelectDialog.py +++ b/mountconfig/SMBShareSelectDialog.py @@ -204,8 +204,8 @@ class SMBShareSelectDialog(KDialogBase): ######################################################################## def slotNewItems(self,items): for entry in items: - newitem = SMBShareListViewItem(self.lookupqueue[0], unicode(entry.name()), KURL(entry.url()), self) - self.url_to_list_item_map[unicode(entry.url().prettyURL())] = newitem + newitem = SMBShareListViewItem(self.lookupqueue[0], str(entry.name()), KURL(entry.url()), self) + self.url_to_list_item_map[str(entry.url().prettyURL())] = newitem # Notice how I copied the KURL object and TQString (to a python string) ######################################################################## @@ -225,7 +225,7 @@ class SMBShareSelectDialog(KDialogBase): ######################################################################## def slotDirListRedirection(self,oldUrl,newUrl): - list_item = self.url_to_list_item_map[unicode(oldUrl.prettyURL())] + list_item = self.url_to_list_item_map[str(oldUrl.prettyURL())] list_item.setURL(KURL(newUrl)) # The copy is important. # Reselect the selected node. (This will force a refresh). @@ -317,7 +317,7 @@ class SMBShareSelectDialog(KDialogBase): self.usernameedit.setEnabled(False) selectedurl = self.selecteditem.getURL() - self.reconnectbutton.setEnabled(unicode(selectedurl.user())!="") + self.reconnectbutton.setEnabled(str(selectedurl.user())!="") self.updatinggui = False @@ -333,11 +333,11 @@ class SMBShareSelectDialog(KDialogBase): self.passwordedit.setEnabled(True) self.usernameedit.setEnabled(True) - username = unicode(self.usernameedit.text()) - password = unicode(self.passwordedit.text()) + username = str(self.usernameedit.text()) + password = str(self.passwordedit.text()) selectedurl = self.selecteditem.getURL() if username!="" and password!="" and \ - ((unicode(selectedurl.user())!=username) or (unicode(selectedurl.pass_())!=password)): + ((str(selectedurl.user())!=username) or (str(selectedurl.pass_())!=password)): self.reconnectbutton.setEnabled(True) else: self.reconnectbutton.setEnabled(False) @@ -404,10 +404,10 @@ class SMBShareListViewItem(TDEListViewItem): self.setExpandable(True) if url.hasPath() and url.path(-1)!="/": - parts = [x for x in unicode(url.path(-1)).split("/") if x!=""] + parts = [x for x in str(url.path(-1)).split("/") if x!=""] self.component = parts[-1].lower() elif url.hasHost(): - self.component = unicode(url.host()).lower() + self.component = str(url.host()).lower() else: self.component = None @@ -502,7 +502,7 @@ class SMBShareListViewItem(TDEListViewItem): # Another wrinkle is that the treeview contains a level of workgroups while # a given URL omits the workgroup a jumps directly to the machine name. def selectURL(self,targeturl): - path = unicode(targeturl.path(-1)) + path = str(targeturl.path(-1)) parts = [x for x in path.split("/") if x!=""] if targeturl.hasHost(): tmp = [targeturl.host()] |