[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [ooni-probe/master] Move lepidopter update install process to the install script



commit 1165aeee44567e604f24291a716ef2fb6202e38f
Author: Arturo Filastò <arturo@xxxxxxxxxxx>
Date:   Mon Sep 5 16:48:56 2016 +0200

    Move lepidopter update install process to the install script
---
 setup.py | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/setup.py b/setup.py
index c465789..60d08a5 100644
--- a/setup.py
+++ b/setup.py
@@ -143,7 +143,7 @@ def is_updater_installed():
     return os.path.exists('/etc/lepidopter-update/version')
 
 
-def install_updater():
+def install_lepidopter_update():
     check_call(["data/updater.py", "install"])
 
 
@@ -199,17 +199,14 @@ class OoniInstall(InstallCommand):
     def run(self):
         self.pre_install()
         self.do_egg_install()
-
+        if is_lepidopter() and not is_updater_installed():
+            print("Lepidopter now requires that ooniprobe is installed via the "
+                 "updater")
+            print("Let me install the auto-updater for you and we shall use that "
+                  "for updates in the future.")
+            install_lepidopter_update()
 
 def setup_package():
-    if is_lepidopter() and not is_updater_installed():
-        print("Lepidopter now requires that ooniprobe is installed via the "
-              "updater")
-        print("Let me install the auto-updater for you and we shall use that "
-              "for updates in the future.")
-        install_updater()
-        return
-
     setup_requires = []
     install_requires = []
     dependency_links = []



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits