Commit 915dc4bb authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

corrected python specific issue

This is a legacy commit from before 2015-05-18.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.


SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/trunk
SVN Revision: 5069
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent 3a01ce4e
#!/usr/bin/env python2
#!/usr/bin/env python
# This is <csbackscp.py>
# ----------------------------------------------------------------------------
# $Id$
......@@ -40,6 +40,7 @@
# data file; use rsync based on timestamp comparison
# (faster than based on checksum comparison [-c])
# 15/03/2013 V1.1 introduced additional [-o|--rsync-opts ARG] flags
# 16/03/2013 V1.1.1 corrected python specific issue
#
# ============================================================================
#
......@@ -56,7 +57,7 @@ import csbackErrorCodes as eCodes
import csbacklog
import pidlock
__version__ = "V1.1"
__version__ = "V1.1.1"
__subversion__ = "$Id$"
__license__ = "GPLv2+"
__author__ = "Daniel Armbruster"
......@@ -288,6 +289,8 @@ def main(argv=None):
# remove directories from rsync output and generate tuples of type
# (directory path, filename)
logger.getLogger().debug("Removing directories from rsync output ...")
if sys.version_info >= (3,):
rsyncOutput = [str(l, encoding='utf8') for l in rsyncOutput]
rsyncOutputTuples = sorted([('/'.join(i.split('/')[0:-1]), \
i.split('/')[-1]) for i in rsyncOutput if not i.split("/")[-1] == ""])
# group tuples by directory pathes
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment