summaryrefslogtreecommitdiffstats
path: root/kolabd.py
diff options
context:
space:
mode:
authorJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2019-10-25 15:07:45 +0200
committerJeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com>2019-10-25 15:07:45 +0200
commit7954241cdfadfbe12829608090486e2cb4771056 (patch)
treebd111dfd557c6e852e97d783e04cd5e905e189ad /kolabd.py
parent28d9e703ea31a070a05589a2bd82b79bc7e6bed4 (diff)
downloadpykolab-7954241cdfadfbe12829608090486e2cb4771056.tar.gz
More linting and compatibility
Diffstat (limited to 'kolabd.py')
-rwxr-xr-xkolabd.py17
1 files changed, 11 insertions, 6 deletions
diff --git a/kolabd.py b/kolabd.py
index ef4500a..0dd270b 100755
--- a/kolabd.py
+++ b/kolabd.py
@@ -8,28 +8,33 @@
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
-
+#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-
+#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
+from __future__ import print_function
+
+import os
import sys
# For development purposes
-sys.path = [ '.' ] + sys.path
+if os.path.isdir(os.path.join(os.path.dirname(__file__), '.git')):
+ sys.path.insert(0, '.')
from pykolab.translate import _
+
try:
from pykolab.constants import *
-except ImportError, e:
- print >> sys.stderr, _("Cannot load pykolab/constants.py:")
- print >> sys.stderr, "%s" % e
+except ImportError as errmsg:
+ print(_("Cannot load pykolab/constants.py:"), file=sys.stderr)
+ print("%s" % (errmsg), file=sys.stderr)
sys.exit(1)
import kolabd