Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Solaris support? #259

Closed
edburns opened this issue Jan 28, 2016 · 2 comments
Closed

Solaris support? #259

edburns opened this issue Jan 28, 2016 · 2 comments

Comments

@edburns
Copy link
Contributor

edburns commented Jan 28, 2016

Hello, When trying to run a script that uses plumbum I see:

bash-4.1$ ./env.py

No sub-command given

Script for setting up a microservices environment.

Usage:
env.py [SWITCHES] [SUBCOMMAND [SWITCHES]] args...

Traceback (most recent call last):
File "./env.py", line 499, in
EnvSetup.run()
File "/scratch/ejburns/SunOS_5.11_i86pc/lib/python2.7/site-packages/plumbum/cli/application.py", line 480, in run
retcode = inst.main(*tailargs)
File "/scratch/ejburns/SunOS_5.11_i86pc/lib/python2.7/site-packages/plumbum/cli/application.py", line 561, in main
self.help()
File "/scratch/ejburns/SunOS_5.11_i86pc/lib/python2.7/site-packages/plumbum/cli/application.py", line 644, in help
cols, _ = get_terminal_size()
File "/scratch/ejburns/SunOS_5.11_i86pc/lib/python2.7/site-packages/plumbum/cli/termsize.py", line 27, in get_terminal_size
if size is None: # we'll assume the standard 80x25 if for any reason we don't know the terminal size
UnboundLocalError: local variable 'size' referenced before assignment

I was advised on #python freenode IRC to file an issue with the probable cause being OS sensitivity.

@henryiii
Copy link
Collaborator

What OS are you on? The reason is that it fails through the list of possible answers to platform.system() and then fails to set a default (which I can fix). Also, what's the output of import platform; platform.system()?

@TheKevJames
Copy link

Looks like #260 fixes this, but line 27 also needs to be changed; since size is undeclared in the default case, we can't compare it to None. Probably should set size = None before doing OS checks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants