Commit d79da86add2d532fa54aa03de39377d6a841a7bd
1 parent
89e50f10
Exists in
dev
Fixing pyros.py for windows and updated celery to 3.1.25
Showing
3 changed files
with
10 additions
and
7 deletions
Show diff stats
install/REQUIREMENTS.txt
@@ -3,7 +3,7 @@ amqplib==1.0.2 | @@ -3,7 +3,7 @@ amqplib==1.0.2 | ||
3 | anyjson==0.3.3 | 3 | anyjson==0.3.3 |
4 | billiard==3.3.0.23 | 4 | billiard==3.3.0.23 |
5 | requests==2.12.3 | 5 | requests==2.12.3 |
6 | -celery==3.1.23 | 6 | +celery==3.1.25 |
7 | DateTime==4.1.1 | 7 | DateTime==4.1.1 |
8 | Django==1.10.2 | 8 | Django==1.10.2 |
9 | django-admin-tools==0.7.2 | 9 | django-admin-tools==0.7.2 |
install/REQUIREMENTS_WINDOWS.txt
@@ -3,7 +3,7 @@ amqplib==1.0.2 | @@ -3,7 +3,7 @@ amqplib==1.0.2 | ||
3 | anyjson==0.3.3 | 3 | anyjson==0.3.3 |
4 | billiard==3.3.0.23 | 4 | billiard==3.3.0.23 |
5 | requests==2.12.3 | 5 | requests==2.12.3 |
6 | -celery==3.1.23 | 6 | +celery==3.1.25 |
7 | DateTime==4.1.1 | 7 | DateTime==4.1.1 |
8 | Django==1.10.2 | 8 | Django==1.10.2 |
9 | django-admin-tools==0.7.2 | 9 | django-admin-tools==0.7.2 |
pyros.py
@@ -526,7 +526,7 @@ class Pyros(AManager): | @@ -526,7 +526,7 @@ class Pyros(AManager): | ||
526 | self.changeDirectory("simulators/config") | 526 | self.changeDirectory("simulators/config") |
527 | self.printColor(Colors.BOLD, "Existing simulations : ", eol='') | 527 | self.printColor(Colors.BOLD, "Existing simulations : ", eol='') |
528 | sys.stdout.flush() | 528 | sys.stdout.flush() |
529 | - if (self.system == "Windows") : self.execProcessSilent("dir conf*.json") | 529 | + if (self.system == "Windows") : self.execProcessSilent("dir /B conf*.json") |
530 | else: self.execProcessSilent("ls conf*.json") | 530 | else: self.execProcessSilent("ls conf*.json") |
531 | self.changeDirectory("..") | 531 | self.changeDirectory("..") |
532 | conf = self.askQuestion("Which simulation do you want to use", default="conf.json") | 532 | conf = self.askQuestion("Which simulation do you want to use", default="conf.json") |
@@ -580,7 +580,7 @@ class Pyros(AManager): | @@ -580,7 +580,7 @@ class Pyros(AManager): | ||
580 | self.changeDirectory("simulators/config") | 580 | self.changeDirectory("simulators/config") |
581 | self.printColor(Colors.BOLD, "Existing simulations : ", eol='') | 581 | self.printColor(Colors.BOLD, "Existing simulations : ", eol='') |
582 | sys.stdout.flush() | 582 | sys.stdout.flush() |
583 | - if (self.system == "Windows") : self.execProcessSilent("dir conf*.json") | 583 | + if (self.system == "Windows") : self.execProcessSilent("dir /B conf*.json") |
584 | else: self.execProcessSilent("ls conf*.json") | 584 | else: self.execProcessSilent("ls conf*.json") |
585 | self.changeDirectory("..") | 585 | self.changeDirectory("..") |
586 | conf = self.askQuestion("Which simulation do you want to use", default="conf.json") | 586 | conf = self.askQuestion("Which simulation do you want to use", default="conf.json") |
@@ -600,11 +600,11 @@ class Pyros(AManager): | @@ -600,11 +600,11 @@ class Pyros(AManager): | ||
600 | self.replacePatternInFile("SIMULATOR = True", "SIMULATOR = False", "pyros/settings.py") | 600 | self.replacePatternInFile("SIMULATOR = True", "SIMULATOR = False", "pyros/settings.py") |
601 | if (self.system == "Windows"): | 601 | if (self.system == "Windows"): |
602 | self.execProcessAsync("taskkill /f /im python.exe") | 602 | self.execProcessAsync("taskkill /f /im python.exe") |
603 | - self.execProcessAsync("rm -f testdb.sqlite3") | 603 | + self.execProcessAsync("del /f testdb.sqlite3") |
604 | self.changeDirectory("..") | 604 | self.changeDirectory("..") |
605 | return 0 | 605 | return 0 |
606 | + else: self.execProcessAsync("rm -f testdb.sqlite3") | ||
606 | self.execProcessAsync("fuser -k 8000/tcp") | 607 | self.execProcessAsync("fuser -k 8000/tcp") |
607 | - self.execProcessAsync("rm -f testdb.sqlite3") | ||
608 | self.execProcessAsync("ps aux | grep \" domeSimulator.py\" | awk '{ print $2 }' | xargs kill") | 608 | self.execProcessAsync("ps aux | grep \" domeSimulator.py\" | awk '{ print $2 }' | xargs kill") |
609 | self.execProcessAsync("ps aux | grep \" userSimulator.py\" | awk '{ print $2 }' | xargs kill") | 609 | self.execProcessAsync("ps aux | grep \" userSimulator.py\" | awk '{ print $2 }' | xargs kill") |
610 | self.execProcessAsync("ps aux | grep \" alertSimulator.py\" | awk '{ print $2 }' | xargs kill") | 610 | self.execProcessAsync("ps aux | grep \" alertSimulator.py\" | awk '{ print $2 }' | xargs kill") |
@@ -623,7 +623,10 @@ class Pyros(AManager): | @@ -623,7 +623,10 @@ class Pyros(AManager): | ||
623 | if (conf == ""): | 623 | if (conf == ""): |
624 | self.printColor(Colors.BOLD, "Existing simulations : ", eol='') | 624 | self.printColor(Colors.BOLD, "Existing simulations : ", eol='') |
625 | sys.stdout.flush() | 625 | sys.stdout.flush() |
626 | - self.execProcessSilent("ls conf*.json") | 626 | + if (self.system == "Windows"): |
627 | + self.execProcessSilent("dir /B conf*.json") | ||
628 | + else: | ||
629 | + self.execProcessSilent("ls conf*.json") | ||
627 | conf = self.askQuestion("Which simulation do you want to use ?", default="conf.json") | 630 | conf = self.askQuestion("Which simulation do you want to use ?", default="conf.json") |
628 | if not os.path.isfile(conf): | 631 | if not os.path.isfile(conf): |
629 | self.printColor(Colors.FAIL, "The simulation file " + conf + " does not exist") | 632 | self.printColor(Colors.FAIL, "The simulation file " + conf + " does not exist") |