Skip to content

Commit d0ed776

Browse files
committed
Merge pull request #6 from rackerlabs/replace_unicode
Replaced Lambda with Pizza and wrapped Print
2 parents 4da8062 + a8dffff commit d0ed776

File tree

2 files changed

+18
-5
lines changed

2 files changed

+18
-5
lines changed

circle.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ machine:
22
python:
33
version: 2.7
44

5+
dependencies:
6+
post:
7+
- rm -r ~/virtualenvs
8+
59
test:
610
pre:
711
- pip install -r test-requirements.txt

lambda_uploader/shell.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,36 @@
2828
LOG = logging.getLogger(__name__)
2929

3030
NAMESPACE = 'rax_jira'
31-
EXCLAIM = '\xe2\x9d\x97\xef\xb8\x8f'
3231
CHECK = '\xe2\x9c\x85'
33-
PIZZA = '\xf0\x9f\x8d\x95'
3432
INTERROBANG = '\xe2\x81\x89\xef\xb8\x8f'
3533
RED_X = '\xe2\x9d\x8c'
34+
LAMBDA = '\xce\xbb'
35+
36+
37+
# Used for stdout for shell
38+
def _print(txt):
39+
# Windows Powershell doesn't support Unicode
40+
if sys.platform == 'win32' or sys.platform == 'cygwin':
41+
print(txt)
42+
else:
43+
# Add the lambda symbol
44+
print("%s %s" % (LAMBDA, txt))
3645

3746

3847
def _execute(args):
3948
pth = path.abspath(args.function_dir)
4049

4150
cfg = config.Config(pth)
42-
print("%s Building Package %s" % (PIZZA, PIZZA))
51+
_print('Building Package')
4352
package.build_package(pth, cfg.requirements)
4453
if not args.no_upload:
45-
print("%s Uploading Package %s" % (PIZZA, PIZZA))
54+
_print('Uploading Package')
4655
uploader.upload_package(pth, cfg)
4756

4857
if not args.no_clean:
4958
package.cleanup(pth)
5059

51-
print("%s Fin %s" % (PIZZA, PIZZA))
60+
_print('Fin')
5261

5362

5463
def main(arv=None):

0 commit comments

Comments
 (0)