Skip to content
This repository has been archived by the owner on Sep 2, 2022. It is now read-only.

Fixes Problems with install & pytz - when pytz wasn't installed before... #5

Open
wants to merge 3 commits into
base: 1.7
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion neotime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,13 @@
from re import compile as re_compile
from time import gmtime, mktime, struct_time

from pytz import FixedOffset
##Just ensures that module can be imported on install, becuase offset is not needed when importing while install.
##After the install it should work every time, cause pytz is installed with the packge.
try:
from pytz import FixedOffset
except:
def FixedOffset():
raise Exception("I seems like pytz is not installed or there is an error with your pytz installation. Please reinstall pytz.")


try:
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
from neotime.meta import package, version



install_requires = [
"pytz",
"six",
Expand Down