diff options
Diffstat (limited to 'geo-replication')
-rw-r--r-- | geo-replication/syncdaemon/argsupgrade.py | 10 | ||||
-rw-r--r-- | geo-replication/syncdaemon/gsyncd.py | 11 | ||||
-rw-r--r-- | geo-replication/syncdaemon/gsyncdconfig.py | 16 | ||||
-rw-r--r-- | geo-replication/syncdaemon/gsyncdstatus.py | 5 | ||||
-rw-r--r-- | geo-replication/syncdaemon/logutils.py | 11 | ||||
-rw-r--r-- | geo-replication/syncdaemon/repce.py | 15 | ||||
-rw-r--r-- | geo-replication/syncdaemon/subcmds.py | 10 | ||||
-rw-r--r-- | geo-replication/syncdaemon/syncdutils.py | 5 |
8 files changed, 77 insertions, 6 deletions
diff --git a/geo-replication/syncdaemon/argsupgrade.py b/geo-replication/syncdaemon/argsupgrade.py index a97c748c40b..632271daf81 100644 --- a/geo-replication/syncdaemon/argsupgrade.py +++ b/geo-replication/syncdaemon/argsupgrade.py @@ -1,3 +1,13 @@ +# -*- coding: utf-8 -*- +# +# Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com> +# This file is part of GlusterFS. +# +# This file is licensed to you under your choice of the GNU Lesser +# General Public License, version 3 or any later version (LGPLv3 or +# later), or the GNU General Public License, version 2 (GPLv2), in all +# cases as published by the Free Software Foundation. +# # Converts old style args into new style args from __future__ import print_function diff --git a/geo-replication/syncdaemon/gsyncd.py b/geo-replication/syncdaemon/gsyncd.py index 1ab65877467..77fca4c9d1f 100644 --- a/geo-replication/syncdaemon/gsyncd.py +++ b/geo-replication/syncdaemon/gsyncd.py @@ -1,4 +1,15 @@ #!/usr/bin/python2 +# -*- coding: utf-8 -*- +# +# Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com> +# This file is part of GlusterFS. +# +# This file is licensed to you under your choice of the GNU Lesser +# General Public License, version 3 or any later version (LGPLv3 or +# later), or the GNU General Public License, version 2 (GPLv2), in all +# cases as published by the Free Software Foundation. +# + from argparse import ArgumentParser import time import os diff --git a/geo-replication/syncdaemon/gsyncdconfig.py b/geo-replication/syncdaemon/gsyncdconfig.py index 9fb2b9e5323..8403477dac3 100644 --- a/geo-replication/syncdaemon/gsyncdconfig.py +++ b/geo-replication/syncdaemon/gsyncdconfig.py @@ -1,4 +1,18 @@ -from ConfigParser import ConfigParser, NoSectionError +# -*- coding: utf-8 -*- +# +# Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com> +# This file is part of GlusterFS. +# +# This file is licensed to you under your choice of the GNU Lesser +# General Public License, version 3 or any later version (LGPLv3 or +# later), or the GNU General Public License, version 2 (GPLv2), in all +# cases as published by the Free Software Foundation. +# + +try: + from configparser import ConfigParser, NoSectionError +except ImportError: + from ConfigParser import ConfigParser, NoSectionError import os from string import Template from datetime import datetime diff --git a/geo-replication/syncdaemon/gsyncdstatus.py b/geo-replication/syncdaemon/gsyncdstatus.py index e75f9dcd62c..e8a810f4b38 100644 --- a/geo-replication/syncdaemon/gsyncdstatus.py +++ b/geo-replication/syncdaemon/gsyncdstatus.py @@ -13,7 +13,10 @@ from __future__ import print_function import fcntl import os import tempfile -import urllib +try: + import urllib.parse as urllib +except ImportError: + import urllib import json import time from datetime import datetime diff --git a/geo-replication/syncdaemon/logutils.py b/geo-replication/syncdaemon/logutils.py index f00685cd92c..01ae7852f23 100644 --- a/geo-replication/syncdaemon/logutils.py +++ b/geo-replication/syncdaemon/logutils.py @@ -1,3 +1,14 @@ +# -*- coding: utf-8 -*- +# +# Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com> +# This file is part of GlusterFS. +# +# This file is licensed to you under your choice of the GNU Lesser +# General Public License, version 3 or any later version (LGPLv3 or +# later), or the GNU General Public License, version 2 (GPLv2), in all +# cases as published by the Free Software Foundation. +# + import logging from logging import Logger, handlers import sys diff --git a/geo-replication/syncdaemon/repce.py b/geo-replication/syncdaemon/repce.py index 1fb90c44032..f819a89bfee 100644 --- a/geo-replication/syncdaemon/repce.py +++ b/geo-replication/syncdaemon/repce.py @@ -13,9 +13,18 @@ import sys import time import logging from threading import Condition -import thread -from Queue import Queue -import cPickle as pickle +try: + import _thread +except ImportError: + import thread as _thread +try: + from queue import Queue +except ImportError: + from Queue import Queue +try: + import cPickle as pickle +except ImportError: + import pickle from syncdutils import Thread, select, lf diff --git a/geo-replication/syncdaemon/subcmds.py b/geo-replication/syncdaemon/subcmds.py index b9e02855392..11d263d7e03 100644 --- a/geo-replication/syncdaemon/subcmds.py +++ b/geo-replication/syncdaemon/subcmds.py @@ -1,3 +1,13 @@ +# -*- coding: utf-8 -*- +# +# Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com> +# This file is part of GlusterFS. +# +# This file is licensed to you under your choice of the GNU Lesser +# General Public License, version 3 or any later version (LGPLv3 or +# later), or the GNU General Public License, version 2 (GPLv2), in all +# cases as published by the Free Software Foundation. +# from __future__ import print_function from syncdutils import lf diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py index 1e40ff56858..ab6753ee96c 100644 --- a/geo-replication/syncdaemon/syncdutils.py +++ b/geo-replication/syncdaemon/syncdutils.py @@ -28,7 +28,10 @@ import select as oselect from os import waitpid as owaitpid import xml.etree.ElementTree as XET from select import error as SelectError -from cPickle import PickleError +try: + from cPickle import PickleError +except ImportError: + from pickle import PickleError from conf import GLUSTERFS_LIBEXECDIR, UUID_FILE sys.path.insert(1, GLUSTERFS_LIBEXECDIR) |