Browse Source

Coloscript2 & PlanetUp: Bug Fixed

 r'\s*' != r'\s+'

 * means 0 or more
 + means 1 or more

 Welp there you have it a regex issue hosed parsing planet info.
david 5 years ago
parent
commit
ef8a8bf6ce
1 changed files with 2 additions and 3 deletions
  1. 2 3
      flexible.py

+ 2 - 3
flexible.py

@@ -2346,8 +2346,8 @@ class PlanetUpScript(object):
                     line = line[:7] + ' ' + line[8:]
 
                 details, _, citadel = line.partition('Class')
-                log.info(details) # Is that what we are after?
-                log.info(citadel)
+                #log.info(details) # Is that what we are after?
+                #log.info(citadel)
                 sector, planet_number, name = re.split(r'\s+', details.strip(), 2)
                 sector = int(sector)
                 number = int(planet_number.replace('#', ''))
@@ -2837,7 +2837,6 @@ class ColoScript2(object):
                 #log.info(details) # Is that what we are after?
                 #log.info(citadel)
                 sector, planet_number, name = re.split(r'\s+', details.strip(), 2)
-                log.info("'{0}' '{1}' '{2}'".format(sector, planet_number, name))
                 sector = int(sector)
                 number = int(planet_number.replace('#', ''))
                 if 'Level' in citadel: