Fixed bug where -k option would not be passed to cleanupFile function
Changed cleanupFile to have no default original path, forcing it to be passed instead, thereby conforming to the Google Python style guide.
This commit is contained in:
@@ -7,7 +7,7 @@ from utils import *
|
|||||||
|
|
||||||
noUpdate = 1
|
noUpdate = 1
|
||||||
|
|
||||||
def cleanupFile( path, original_path=kernel_original_path ):
|
def cleanupFile( path, original_path):
|
||||||
"""reads an original header and perform the cleanup operation on it
|
"""reads an original header and perform the cleanup operation on it
|
||||||
this functions returns the destination path and the clean header
|
this functions returns the destination path and the clean header
|
||||||
as a single string"""
|
as a single string"""
|
||||||
@@ -121,7 +121,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
if noUpdate:
|
if noUpdate:
|
||||||
for path in args:
|
for path in args:
|
||||||
dst_path, newdata = cleanupFile(path)
|
dst_path, newdata = cleanupFile(path,kernel_original_path)
|
||||||
print newdata
|
print newdata
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
@@ -131,7 +131,7 @@ if __name__ == "__main__":
|
|||||||
b = BatchFileUpdater()
|
b = BatchFileUpdater()
|
||||||
|
|
||||||
for path in args:
|
for path in args:
|
||||||
dst_path, newdata = cleanupFile(path)
|
dst_path, newdata = cleanupFile(path,kernel_original_path)
|
||||||
if not dst_path:
|
if not dst_path:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user