summaryrefslogtreecommitdiff
path: root/community/avant-window-navigator/821_820.diff
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-11-12 01:31:01 -0800
committerroot <root@rshg054.dnsready.net>2012-11-12 01:31:01 -0800
commitb863c91c6c9218e2ad9458231b24385be177ed08 (patch)
treeda88c798b067fd2af9ad0c2237917826cef02c8e /community/avant-window-navigator/821_820.diff
parentc1c596c922f0dc8622339011db936c531647203d (diff)
Mon Nov 12 01:30:54 PST 2012
Diffstat (limited to 'community/avant-window-navigator/821_820.diff')
-rw-r--r--community/avant-window-navigator/821_820.diff96
1 files changed, 96 insertions, 0 deletions
diff --git a/community/avant-window-navigator/821_820.diff b/community/avant-window-navigator/821_820.diff
new file mode 100644
index 000000000..bd8c5b279
--- /dev/null
+++ b/community/avant-window-navigator/821_820.diff
@@ -0,0 +1,96 @@
+=== modified file 'awn-settings/awnClass.py'
+--- awn-settings/awnClass.py 2010-08-24 00:21:51 +0000
++++ awn-settings/awnClass.py 2011-02-13 23:43:42 +0000
+@@ -53,9 +53,13 @@
+ import tempfile
+ import dbus
+
+-from bzrlib import branch
+-from bzrlib.builtins import cmd_branch, cmd_pull
+-from bzrlib.plugins.launchpad.lp_directory import LaunchpadDirectory
++try:
++ from bzrlib import branch
++ from bzrlib.builtins import cmd_branch, cmd_pull
++ from bzrlib.plugins.launchpad.lp_directory import LaunchpadDirectory
++ support_bzr = True
++except:
++ support_bzr = False
+
+ defs.i18nize(globals())
+
+@@ -127,8 +131,11 @@
+ path: a url from a branch
+ return: the http format of a lp: format, or the same url
+ '''
+- directory = LaunchpadDirectory()
+- return directory._resolve(path).replace("bzr+ssh","http")
++ if support_bzr == True:
++ directory = LaunchpadDirectory()
++ return directory._resolve(path).replace("bzr+ssh","http")
++ else:
++ return path
+
+ def read_list(self, file_path):
+ ''' Read a flat file and return the content in a list
+@@ -148,34 +155,44 @@
+ path: the path of the branch
+ bzr_dir: the location of the futur tree.
+ '''
+- if os.path.exists(path):
+- print ("Error, the path already exist")
++ if support_bzr == False:
++ print (_("Bzr support is not enable, try to install bzr"))
+ else:
+- try:
+- bzr_branch = cmd_branch()
+- status = StringIO()
+- status = bzr_branch._setup_outf()
+- bzr_branch.run(from_location=self.lp_path_normalize(bzr_dir), to_location=path)
+- except socket.gaierror:
+- print 'Socket error, could not create branch.'
++ if os.path.exists(path):
++ print (_("Error, the path already exist"))
++ else:
++ try:
++ bzr_branch = cmd_branch()
++ status = StringIO()
++ status = bzr_branch._setup_outf()
++ bzr_branch.run(from_location=self.lp_path_normalize(bzr_dir), to_location=path)
++ except socket.gaierror:
++ print (_('Socket error, could not create branch.'))
+
+ def update_branch(self, path):
+ ''' Update a local branch
+ path: Location of the branch
+ Return the output of the command
+ '''
+- bzr_pull = cmd_pull()
+- status = StringIO()
+- status = bzr_pull._setup_outf()
+- bzr_pull.run(directory=path)
++ if support_bzr == False:
++ print (_("Bzr support is not enable, try to install bzr"))
++ else:
++ bzr_pull = cmd_pull()
++ status = StringIO()
++ status = bzr_pull._setup_outf()
++ bzr_pull.run(directory=path)
+
+ def get_revision_from_path(self, path):
+ ''' Return the last revision number of the branch
+ specify with path parameter
+ '''
+- tree = branch.Branch.open(path)
+- revision_number, revision_id = tree.last_revision_info()
+- return revision_number
++ if support_bzr == False:
++ print (_("Bzr support is not enable, try to install bzr"))
++ return 0
++ else:
++ tree = branch.Branch.open(path)
++ revision_number, revision_id = tree.last_revision_info()
++ return revision_number
+
+ #Sources.list
+ def dict_from_sources_list(self, config=defs.HOME_CONFIG_DIR):
+