From 6c4a7601e2ca6375589e0571b184da06cd97de8b Mon Sep 17 00:00:00 2001
From: Andreas Heger <andreas.heger@gmail.com>
Date: Thu, 25 May 2017 21:00:53 +0100
Subject: [PATCH] {AH} increase version to 1.3.4, bugfix for py2

---
 doc/release.rst | 3 +++
 gat/IOTools.py  | 5 ++++-
 setup.py        | 2 +-
 3 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/doc/release.rst b/doc/release.rst
index 30150a7..d8695ab 100644
--- a/doc/release.rst
+++ b/doc/release.rst
@@ -2,6 +2,9 @@
 Release Notes
 =============
 
+1.3.4:
+  * Bugifxes to (hopefully) complete python 2/3 compatibility.
+
 1.3.0:
 
   * GAT now works under python 2 and python 3
diff --git a/gat/IOTools.py b/gat/IOTools.py
index 7aa2bdb..78aeaaa 100644
--- a/gat/IOTools.py
+++ b/gat/IOTools.py
@@ -542,5 +542,8 @@ def openFile(filename, mode="r", create_dir=False, encoding="utf-8"):
         else:
             return gzip.open(filename, mode)
     else:
-        return open(filename, mode, encoding=encoding)
+        if sys.version_info.major >= 3:
+            return open(filename, mode, encoding=encoding)
+        else:
+            return open(filename, mode)
 
diff --git a/setup.py b/setup.py
index 6ff3a13..4ece83a 100644
--- a/setup.py
+++ b/setup.py
@@ -95,7 +95,7 @@
 
 
 name = "gat"
-version = "1.3.3"
+version = "1.3.4"
 
 classifiers = """
 Development Status :: 4 - Beta