Skip to content

Commit 29582e3

Browse files
committed
updates for python 3
1 parent b44f038 commit 29582e3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

scripts/find_unused.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,14 @@
66
77
__author__ = "Christian Huffman"
88
__version__ = "1 July, 2019"
9+
10+
Updated September 2022 to run with Python 3.
11+
12+
Run with `python scripts/find_unused.py .` at the repo root level to run against the entire repo.
913
"""
1014

15+
from __future__ import print_function
16+
1117
from os.path import join
1218
import argparse
1319
import os
@@ -48,7 +54,7 @@ def process(self):
4854
self.move_files(self.args.path,remaining_modules)
4955
else:
5056
for filename in remaining_modules:
51-
print remaining_modules[filename]
57+
print(remaining_modules[filename])
5258

5359
def check_assemblies(self,assemblies,modules):
5460
"""
@@ -79,7 +85,7 @@ def move_files(self,root,remaining_modules):
7985
try:
8086
for key in remaining_modules:
8187
os.rename(remaining_modules[key],root + "/" + self.unused_directory + "/" + key)
82-
print "Moved %d files" % len(remaining_modules)
88+
print("Moved %d files" % len(remaining_modules))
8389
except OSError as err:
8490
print("Unable to move files: {0}".format(err))
8591
print("Target destination: " + self.unused_directory)

0 commit comments

Comments
 (0)