Changeset 14376 in genesis
- Timestamp:
- Jun 11, 2019, 12:57:59 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tools/gformat.py
r14374 r14376 1502 1502 1503 1503 # Update repository if requested 1504 form = urllib.parse. urlparse.parse_qs(environ['QUERY_STRING']) if QUERY_STRING in environ else None1504 form = urllib.parse.parse_qs(environ.get('QUERY_STRING')) 1505 1505 if form and 'action' in form and 'update' in form['action']: 1506 1506 refresh_rate = 5 1507 1507 output = "[INFO] Updating subverion, please wait...\n" 1508 old_version = subprocess.Popen([SVNVERSION, '-c', "%s/.." % NODE_DIR], stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0] 1509 output += subprocess.Popen([SVN, 'cleanup', "%s/.." % NODE_DIR], stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0] 1510 output += subprocess.Popen([SVN, 'up', "%s/.." % NODE_DIR], stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0] 1511 new_version = subprocess.Popen([SVNVERSION, '-c', "%s/.." % NODE_DIR], stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0] 1512 if old_version != new_version or ('QUERY_STRING' in environ and 'force' in environ['QUERY_STRING']):1508 old_version = subprocess.Popen([SVNVERSION, '-c', "%s/.." % NODE_DIR], stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].decode('utf-8') 1509 output += subprocess.Popen([SVN, 'cleanup', "%s/.." % NODE_DIR], stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].decode('utf-8') 1510 output += subprocess.Popen([SVN, 'up', "%s/.." % NODE_DIR], stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].decode('utf-8') 1511 new_version = subprocess.Popen([SVNVERSION, '-c', "%s/.." % NODE_DIR], stderr=subprocess.STDOUT, stdout=subprocess.PIPE).communicate()[0].decode('utf-8') 1512 if old_version != new_version or 'force' in environ.get('QUERY_STRING'): 1513 1513 try: 1514 1514 generate_static(CACHE_DIR, False) … … 1528 1528 # URL must be of format <prefix>/config/<path> 1529 1529 base_uri = environ['REQUEST_URI'] 1530 uri = filter(None, base_uri.split('/config/')[1].strip('/').split('/'))1530 uri = list(filter(None, base_uri.split('/config/')[1].strip('/').split('/'))) 1531 1531 1532 1532 output = "Template Holder"
Note:
See TracChangeset
for help on using the changeset viewer.