Ejemplo n.º 1
0
 def __init__(self, latest_patch_version, tahoe_node_url, verbosity=0):
     self.verbosity = verbosity
     self.tahoe_node_url = tahoe_node_url
     ver = get_tahoe_version(tahoe_node_url)
     if ver is not None:
         self.tahoe_version = LooseVersion(ver)
     else:
         self.tahoe_version = ver
     print("Detected tahoe v%s" % self.tahoe_version)
     self.latest_patch_version = latest_patch_version
     self.datadir = find_datadir()
     self.is_compatible_version = compatible_version(self.tahoe_version,
             self.verbosity)
     if self.verbosity > 0 and ver is not None:
         print("-- Patching or checking Tahoe web console --")
     tahoe_dir = find_tahoe_dir(tahoe_node_url)
     if tahoe_dir is not None:
         self.webdir = os.path.join(tahoe_dir, 'web')
     else:
         sys.exit(1)
     self.filepaths = {'welcome.xhtml': [], 'tahoe.css': []}
     if ver is not None:
         self.add_patch_filepaths()
         self.add_target_filepaths()
     if self.verbosity > 3:
         print('DEBUG: Data dir is: %s' % self.datadir)
         print('DEBUG: Tahoe web dir is: %s' % self.webdir)
         if ver is not None and self.is_compatible_version:
             print('DEBUG: File paths:')
             print(self.filepaths)
Ejemplo n.º 2
0
 def __init__(self, latest_patch_version, tahoe_node_url, verbosity=0):
     self.verbosity = verbosity
     self.tahoe_node_url = tahoe_node_url
     ver = get_tahoe_version(tahoe_node_url)
     if ver is not None:
         self.tahoe_version = LooseVersion(ver)
     else:
         self.tahoe_version = ver
     print("Detected tahoe v%s" % self.tahoe_version)
     self.latest_patch_version = latest_patch_version
     self.datadir = find_datadir()
     self.is_compatible_version = compatible_version(
         self.tahoe_version, self.verbosity)
     if self.verbosity > 0 and ver is not None:
         print("-- Patching or checking Tahoe web console --")
     tahoe_dir = find_tahoe_dir(tahoe_node_url)
     if tahoe_dir is not None:
         self.webdir = os.path.join(tahoe_dir, 'web')
     else:
         sys.exit(1)
     self.filepaths = {'welcome.xhtml': [], 'tahoe.css': []}
     if ver is not None:
         self.add_patch_filepaths()
         self.add_target_filepaths()
     if self.verbosity > 3:
         print('DEBUG: Data dir is: %s' % self.datadir)
         print('DEBUG: Tahoe web dir is: %s' % self.webdir)
         if ver is not None and self.is_compatible_version:
             print('DEBUG: File paths:')
             print(self.filepaths)
Ejemplo n.º 3
0
 def compat(ver):
     return functions.compatible_version(ver)
Ejemplo n.º 4
0
 def compat(ver):
     return functions.compatible_version(ver)