Skip to content

Commit c6ff4ef

Browse files
committed
default to home dir if env var not set
1 parent b3c9855 commit c6ff4ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

009/newpost.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66

77
import requests
88

9-
PYB_CONTENT_DIR = os.environ.get('PYB_CONTENT_DIR') \
10-
or sys.exit('Set PYB_CONTENT_DIR env var')
9+
PYB_CONTENT_DIR = os.environ.get('PYB_CONTENT_DIR') or os.path.expanduser('~')
10+
print(PYB_CONTENT_DIR); sys.exit()
1111
LOGGED_IN_USER = os.getlogin()
1212
DEFAULT_HOURS = 2
1313
DEFAULT_IMAGE, SPECIAL_IMAGE = 'pb-article.png', 'pb-special.png'

0 commit comments

Comments
 (0)