summaryrefslogtreecommitdiffstats
path: root/src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py
diff options
context:
space:
mode:
authorBala.FA <bala@gluster.com>2011-08-03 14:56:32 +0530
committerBala.FA <bala@gluster.com>2011-08-03 14:56:32 +0530
commit6dbbf73befc14da2a794e7233c357691b5f5e982 (patch)
tree1bcbffd091c31c509e81e462dccf732bb9e05664 /src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py
parent73644291bb5ea77cbb7d3e351992fea13e1a6be9 (diff)
Fixed - Bug 3300 - Format_device.py is not working.
Added current and previous/common directories in sys.path. Flipped DOS to Unix file format in all python scripts. Signed-off-by: Bala.FA <bala@gluster.com>
Diffstat (limited to 'src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py')
-rw-r--r--src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py b/src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py
index 3408c14a..aaef5afe 100644
--- a/src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py
+++ b/src/com.gluster.storage.management.gateway/WebContent/scripts/Utils.py
@@ -15,8 +15,14 @@
# along with this program. If not, see
# <http://www.gnu.org/licenses/>.
-import sys
import os
+import sys
+p1 = os.path.abspath(os.path.dirname(sys.argv[0]))
+p2 = "%s/common" % os.path.dirname(p1)
+if not p1 in sys.path:
+ sys.path.append(p1)
+if not p2 in sys.path:
+ sys.path.append(p2)
import re
import socket
import struct