diff options
Diffstat (limited to 'globalist')
-rw-r--r-- | globalist/README.md | 5 | ||||
-rwxr-xr-x | globalist/globalist/__init__.py | 12 |
2 files changed, 9 insertions, 8 deletions
diff --git a/globalist/README.md b/globalist/README.md index a0ff6458..30cb1525 100644 --- a/globalist/README.md +++ b/globalist/README.md @@ -13,9 +13,10 @@ The official repository can be found at https://notabug.org/themusicgod1/cloudfl ## Usage -To use Globalist.py python3 is needed. Either run it from globalist directory with `python3 Globalist.py` or or install it as described below. +To use Globalist.py python3 is needed. Either run it from globalist directory with `python3 Globalist.py` or or install it as described below. -Per default an open tor ControlPort at 9151 without authentication is expected. You can choose another port with `-C`. For a list of option see `--help`. +Per default an open tor ControlPort at 9151 without authentication is expected. You can choose another port with `-C`. +For a list of option see `--help`. ### Create repository diff --git a/globalist/globalist/__init__.py b/globalist/globalist/__init__.py index 172edfb2..12bad40a 100755 --- a/globalist/globalist/__init__.py +++ b/globalist/globalist/__init__.py @@ -111,7 +111,7 @@ def makeonion(controller, config, options): onion = None extra_kwargs = {} - + if config.has_section('onion'): print ("Attempting to use saved onion identity") (keytype,key) = config.get('onion', 'key').split(':',1) @@ -194,7 +194,7 @@ def set_client_authentications(ls): controller.set_conf('hidservauth', hsa['hidservauth']) controller.close() - + def getpeers(config): if STATUS['peers']: @@ -256,12 +256,14 @@ def clone(config): make_exportable(where) # Make a local editable repo - git(["clone", "repo.git", "repo"]).wait() + try: + git(["clone", "repo", "repo.git"]).wait() + except: + print ("Failed to export repository, try to remove 'repo.git'.") processes = [] for peer in peers[1:]: processes.append([peer, subprocess.Popen(["torsocks", "-P", STATUS['socksport'], "git", "-C", os.path.abspath("repo"), "pull", "git://%s.onion/repo" % peer])]) - for (peer,proc) in processes: if proc.wait() != 0: print ("Error with %s" % peer) @@ -274,7 +276,6 @@ def pull(config): processes = [] for peer in peers: processes.append([peer, subprocess.Popen(["torsocks", "-P", STATUS['socksport'], "git", "-C", os.path.abspath("repo"), "pull", "git://%s.onion/repo" % peer])]) - for (peer,proc) in processes: if proc.wait() != 0: print ("Error with %s" % peer) @@ -285,7 +286,6 @@ def fetch(config): processes = [] for peer in peers: processes.append([peer, subprocess.Popen(["torsocks", "-P", STATUS['socksport'], "git", "-C", os.path.abspath("repo.git"), "fetch", "git://%s.onion/repo.git" % peer, '+refs/heads/*:refs/remotes/origin/*'])]) -# , for (peer,proc) in processes: if proc.wait() != 0: |