Tweaking template_dir before apply_lcwd is called on a None object. #912

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@yellottyellott

Issue #902

When calling upload_template with use_jinja=True and leaving template_dir=None, apply_lcwd is called with None
https://github.com/fabric/fabric/blob/master/fabric/contrib/files.py#L101

which calls os.path.isabs(None)
https://github.com/fabric/fabric/blob/master/fabric/utils.py#L356

which raises:

Python 2.7.2 (default, Oct 11 2012, 20:14:37)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from os.path import isabs
>>> isabs(None)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/posixpath.py", line 53, in isabs
    return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
>>>
@homm
homm commented Jun 7, 2013

Good.

@bitprophet
Member

Hey, thanks! Couple of things:

@bitprophet bitprophet added a commit that referenced this pull request Jul 7, 2013
@bitprophet bitprophet Add test proving #912 3245f93
@bitprophet bitprophet added a commit that referenced this pull request Jul 7, 2013
@bitprophet bitprophet Changelog re #912, fixes #912 f927059
@bitprophet bitprophet added a commit that closed this pull request Jul 7, 2013
@bitprophet bitprophet Changelog re #912, fixes #912 f927059
@bitprophet bitprophet closed this in f927059 Jul 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment