Explorar o código

Avoid invalid regex to be compiled

Resolve #17
Markus Hofbauer %!s(int64=5) %!d(string=hai) anos
pai
achega
f2cb26a38b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      main.py

+ 1 - 1
main.py

@@ -208,7 +208,7 @@ if __name__ == "__main__":
     # TC Variables
     args = parse_arguments()
 
-    pattern = re.compile(args.regex)
+    pattern = re.compile(args.regex) if args.regex else args.regex
     dev_list = args.dev
 
     # Flask Variable