[Pkg-owncloud-commits] [owncloud-client] 02/02: Added patch for make nautilus script be python3 compatible

Sandro Knauß hefee-guest at moszumanska.debian.org
Sun Nov 9 16:18:27 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit c4cbef3ed8e67ab872448e56962215e4b678a0a5
Author: Sandro Knauß <bugs at sandroknauss.de>
Date:   Sun Nov 9 17:17:41 2014 +0100

    Added patch for make nautilus script be python3 compatible
---
 ...nt-and-make-nautilus-script-python3-compa.patch | 99 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 100 insertions(+)

diff --git a/debian/patches/0006-Fixing-indent-and-make-nautilus-script-python3-compa.patch b/debian/patches/0006-Fixing-indent-and-make-nautilus-script-python3-compa.patch
new file mode 100644
index 0000000..a6fb2e5
--- /dev/null
+++ b/debian/patches/0006-Fixing-indent-and-make-nautilus-script-python3-compa.patch
@@ -0,0 +1,99 @@
+From: hefee <hefee at netzguerilla.net>
+Date: Sun, 9 Nov 2014 16:59:01 +0100
+Subject: Fixing indent and make nautilus script python3 compatible.
+
+---
+ shell_integration/nautilus/syncstate.py | 54 ++++++++++++++++-----------------
+ 1 file changed, 27 insertions(+), 27 deletions(-)
+
+diff --git a/shell_integration/nautilus/syncstate.py b/shell_integration/nautilus/syncstate.py
+index 3d0cc04..93fec41 100755
+--- a/shell_integration/nautilus/syncstate.py
++++ b/shell_integration/nautilus/syncstate.py
+@@ -41,18 +41,18 @@ class syncStateExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.Info
+             sock_file = os.environ["XDG_RUNTIME_DIR"]+postfix
+             print ("XXXX " + sock_file + " <=> " + postfix)
+             if sock_file != postfix:
+-		try:
+-		    print("Socket File: "+sock_file)
+-		    self.sock.connect(sock_file)
+-		    self.connected = True
+-		    print("Setting connected to %r" % self.connected )
+-		    self.watch_id = GObject.io_add_watch(self.sock, GObject.IO_IN, self.handle_notify)
+-		    do_reconnect = False
+-		except Exception, e:
+-		    print("Could not connect to unix socket." + str(e))
+-	    else:
+-		 print("Sock-File not valid: "+sock_file)
+-        except Exception, e:
++                try:
++                    print("Socket File: "+sock_file)
++                    self.sock.connect(sock_file)
++                    self.connected = True
++                    print("Setting connected to %r" % self.connected )
++                    self.watch_id = GObject.io_add_watch(self.sock, GObject.IO_IN, self.handle_notify)
++                    do_reconnect = False
++                except Exception as e:
++                    print("Could not connect to unix socket." + str(e))
++            else:
++                print("Sock-File not valid: "+sock_file)
++        except Exception as e:
+             print("Connect could not be established, try again later " + str(e))
+             self.sock.close()
+         # print("Returning %r" % do_reconnect)
+@@ -75,7 +75,7 @@ class syncStateExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.Info
+             return None
+ 
+     def askForOverlay(self, file):
+-	# print("Asking for overlay for "+file)
++        # print("Asking for overlay for "+file)
+         if os.path.isdir(file):
+             folderStatus = self.sendCommand("RETRIEVE_FOLDER_STATUS:"+file+"\n");
+ 
+@@ -85,15 +85,15 @@ class syncStateExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.Info
+     def invalidate_items_underneath(self, path):
+         update_items = []
+         if not self.nautilusVFSFile_table:
+-	    self.askForOverlay(path)
+-	else:
+-	    for p in self.nautilusVFSFile_table:
+-		if p == path or p.startswith(path):
+-		    item = self.nautilusVFSFile_table[p]['item']
+-		    update_items.append(item)
++            self.askForOverlay(path)
++        else:
++            for p in self.nautilusVFSFile_table:
++                if p == path or p.startswith(path):
++                    item = self.nautilusVFSFile_table[p]['item']
++                    update_items.append(item)
+ 
+-	    for item in update_items:
+-		item.invalidate_extension_info()
++            for item in update_items:
++                item.invalidate_extension_info()
+ 
+     # Handles a single line of server respoonse and sets the emblem
+     def handle_server_response(self, l):
+@@ -118,16 +118,16 @@ class syncStateExtension(GObject.GObject, Nautilus.ColumnProvider, Nautilus.Info
+             # file = parts[1]
+             # print "Action for " + file + ": "+parts[0]
+             if action == 'STATUS':
+-		newState = parts[1]
++                newState = parts[1]
+                 emblem = Emblems[newState]
+                 if emblem:
+                     itemStore = self.find_item_for_file(parts[2])
+                     if itemStore:
+-			if( not itemStore['state'] or newState != itemStore['state'] ):
+-			    item = itemStore['item']
+-			    item.add_emblem(emblem)
+-			    # print "Setting emblem on " + parts[2]+ "<>"+emblem+"<>"
+-			    self.nautilusVFSFile_table[parts[2]] = {'item': item, 'state':newState}
++                        if( not itemStore['state'] or newState != itemStore['state'] ):
++                            item = itemStore['item']
++                            item.add_emblem(emblem)
++                            # print "Setting emblem on " + parts[2]+ "<>"+emblem+"<>"
++                            self.nautilusVFSFile_table[parts[2]] = {'item': item, 'state':newState}
+ 
+             elif action == 'UPDATE_VIEW':
+                 # Search all items underneath this path and invalidate them
diff --git a/debian/patches/series b/debian/patches/series
index 713d1a6..020532f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0003-skip_tests_freebsd.patch
 0004-shell_integration_copyright.patch
 0005-remove_admin.patch
+0006-Fixing-indent-and-make-nautilus-script-python3-compa.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list