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

Fails when using File backend #12

Closed
faxm0dem opened this issue May 31, 2013 · 4 comments
Closed

Fails when using File backend #12

faxm0dem opened this issue May 31, 2013 · 4 comments

Comments

@faxm0dem
Copy link

This must be something trivial, but I dont do python so this should be trivial for you ;)

$ ./vSPCServer -f /tmp/foo
Traceback (most recent call last):
  File "./vSPCServer", line 129, in <module>
    (options, args) = parser.parse_args()
  File "/usr/lib64/python2.6/optparse.py", line 1394, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib64/python2.6/optparse.py", line 1438, in _process_args
    self._process_short_opts(rargs, values)
  File "/usr/lib64/python2.6/optparse.py", line 1545, in _process_short_opts
    option.process(opt, value, values, self)
  File "/usr/lib64/python2.6/optparse.py", line 788, in process
    self.action, self.dest, opt, value, values, parser)
  File "/usr/lib64/python2.6/optparse.py", line 808, in take_action
    self.callback(self, opt, value, parser, *args, **kwargs)
  File "./vSPCServer", line 72, in handle_persist_file
    parser.values.backend_args = "-f %s" % pipes.quote(value)
  File "/usr/lib64/python2.6/pipes.py", line 271, in quote
    for c in file:
TypeError: 'NoneType' object is not iterable
@faxm0dem
Copy link
Author

Okay I just tracked down the problem. It seems the default type is set to None. Adding type='string' to the parser.add_option call solves the problem

@faxm0dem
Copy link
Author

Fix is included in https://github.com/isnotajoke/vSPC.py/pull/13
along with other patch that allows one to change listening interfaces (instead of *)

@isnotajoke
Copy link
Collaborator

Sweet, thanks for the report & patch. I should have time to take a look at it (and your other changes) this weekend.

@isnotajoke
Copy link
Collaborator

Your fix looks solid, and I merged it into master. Thanks!

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

2 participants