Skip to content

Commit 0b07fc3

Browse files
author
Sebastian Jahr
committed
Restore python 2 compatibility.
1 parent bb9a0fe commit 0b07fc3

File tree

7 files changed

+11
-5
lines changed

7 files changed

+11
-5
lines changed

package.xml

+1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<exec_depend>python-yaml</exec_depend>
5353
<exec_depend>rospy</exec_depend>
5454
<exec_depend>tmux</exec_depend>
55+
<exec_depend>future</exec_depend>
5556

5657
<!-- The export tag contains other, unspecified, tags -->
5758
<export>

script/create_session

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
# -- END LICENSE BLOCK ------------------------------------------------
2121

22-
22+
from __future__ import print_function
2323
import os
2424
import subprocess
2525
import sys

src/catmux/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
# -- END LICENSE BLOCK ------------------------------------------------
2020

2121
"""Loads all modules from other files"""
22+
from __future__ import absolute_import
2223

2324
from catmux.window import Window
2425
from catmux.session import Session

src/catmux/session.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# -- END LICENSE BLOCK ------------------------------------------------
2020

2121
"""Contains everything around the config file"""
22-
22+
from __future__ import print_function, absolute_import
2323

2424
import re
2525
import yaml

src/catmux/split.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
# -- END LICENSE BLOCK ------------------------------------------------
2020

2121
"""A split in a tmux session"""
22+
from __future__ import print_function, absolute_import
2223

24+
from future.utils import iteritems
2325

2426
import catmux.tmux_wrapper as tmux
2527

@@ -32,7 +34,7 @@ def __init__(self, **kwargs):
3234
"""TODO: to be defined1. """
3335

3436
if kwargs is not None:
35-
for key, value in kwargs.items():
37+
for (key, value) in iteritems(kwargs):
3638
setattr(self, key, value)
3739

3840
def debug(self, name='', prefix=''):

src/catmux/tmux_wrapper.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# -- END LICENSE BLOCK ------------------------------------------------
2020

2121
"""Wraps usage of tmux commands"""
22-
22+
from __future__ import print_function
2323

2424
import subprocess
2525

src/catmux/window.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919
# -- END LICENSE BLOCK ------------------------------------------------
2020

2121
"""Contains the Window object"""
22+
from __future__ import print_function, absolute_import
2223

24+
from future.utils import iteritems
2325

2426
import time
2527

@@ -45,7 +47,7 @@ def __init__(self, **kwargs):
4547
self.splits.append(Split(**split_data))
4648

4749
if kwargs is not None:
48-
for key, value in kwargs.items():
50+
for (key, value) in iteritems (kwargs):
4951
setattr(self, key, value)
5052

5153

0 commit comments

Comments
 (0)