+#!/usr/bin/env python3
+
+# Copyright (C) 2013 Intra2net AG
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser 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 Lesser 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/lgpl-3.0.html>
+
import argparse
import binascii
import json
target_it = deltatar.jsonize_path_iterator(target_it, strip=nbars2)
while True:
try:
- sitem = source_it.next()
- titem = target_it.next()
+ sitem = next(source_it)
+ titem = next(target_it)
except StopIteration:
try:
- titem = target_it.next()
+ titem = next(target_it)
raise Exception("iterators do not stop at the same time")
except StopIteration:
break
try:
assert deltatar._equal_stat_dicts(sitem, titem)
- except Exception, e:
- print sitem
- print titem
- print "FAIL"
+ except Exception as e:
+ print(sitem)
+ print(titem)
+ print("FAIL")
raise
if __name__ == "__main__":