Fix NoneType.

This commit is contained in:
xjw0914
2017-09-15 11:06:20 +08:00
parent 200e73a321
commit 6ed7ad64f3
+2
View File
@@ -42,6 +42,8 @@ class Project(object):
@property
def name(self):
if self._name is None:
if not self.pipfile_exists:
exit(1)
self._name = self.pipfile_location.split(os.sep)[-2]
return self._name