Skip to content

Commit ebd1227

Browse files
committed
libfuturize.fixer_util: Revert use of node.set_prefix() since this doesn't work on Py3.3
1 parent 108bb58 commit ebd1227

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/libfuturize/fixer_util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,8 @@ def future_import(feature, node):
220220
# If this __future__ import would go on the first line,
221221
# detach the shebang / encoding prefix from the current first line.
222222
# and attach it to our new __future__ import node.
223-
import_.set_prefix(root.children[0].get_prefix())
224-
root.children[0].set_prefix(u'')
223+
import_.prefix = root.children[0].prefix
224+
root.children[0].prefix = u''
225225
# End the __future__ import line with a newline and add a blank line
226226
# afterwards:
227227
children = [import_ , Newline()]

0 commit comments

Comments
 (0)