diff --git a/app.yaml b/app.yaml index 85293e6..6f5eab8 100644 --- a/app.yaml +++ b/app.yaml @@ -1,6 +1,6 @@ #application: bash-minifier #version: 1 -runtime: python27 +runtime: python3 api_version: 1 threadsafe: true diff --git a/minifier.py b/minifier.py old mode 100755 new mode 100644 index a430d7c..d1fb2d0 --- a/minifier.py +++ b/minifier.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 import sys @@ -19,7 +19,7 @@ def is_group_opening(self): def __eq__(self, other): if isinstance(other, BashFileIterator._Delimiter): return other.character == self.character - elif isinstance(other, basestring): + elif isinstance(other, str): return other == self.character return False @@ -213,7 +213,6 @@ def close_heredoc(): self.pos += 1 assert not self.isInsideGroup(), 'Invalid syntax' - raise StopIteration def isEscaped(self): return self.pos in self._indices_of_escaped_characters diff --git a/run_tests.sh b/run_tests.sh index 7a08616..eec0a29 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -5,7 +5,7 @@ passed=0 failed=0 for f in t*.sh; do echo -n "$f " - python ../minifier.py $f > _tmp_$f + python3 ../minifier.py $f > _tmp_$f if [ `diff _tmp_$f minified_$f | wc -c` -ne 0 ]; then failed=$((failed+1)) echo FAILED @@ -16,4 +16,4 @@ for f in t*.sh; do rm _tmp_$f done echo PASSED $passed, FAILED $failed -popd > /dev/null \ No newline at end of file +popd > /dev/null