tree_expire = ini.getint("general", "expire")
repo_url = ini.get("repo", "url")
+repo_branch = "master"
+
+if ini.has_option("repo", "branch"):
+ repo_branch = ini.get_option("repo", "branch")
rsync_bin_url = ini.get("rsync", "binary_url")
rsync_bin_key = ini.get("rsync", "binary_password")
if not os.path.isdir(home_dir+'/source.git'):
subprocess.call(["git", "clone", "--depth=1", repo_url, home_dir+'/source.git'])
+ subprocess.call(["git", "checkout", repo_branch], cwd = home_dir+'/source.git')
findtargets = subprocess.Popen([home_dir+'/dumpinfo.pl', 'targets'],
stdout = subprocess.PIPE, cwd = home_dir+'/source.git')