Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: native_client_sdk/src/tools/create_nmf.py

Issue 10868089: add PRESUBMIT for native_client_sdk. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « native_client_sdk/src/examples/httpd.py ('k') | native_client_sdk/src/tools/getos.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/tools/create_nmf.py
diff --git a/native_client_sdk/src/tools/create_nmf.py b/native_client_sdk/src/tools/create_nmf.py
index 195c55324e5dfbb2b7c5924a91913ce831587149..ba5f1e42342d9ac5a2bee95f6ece591e0a73fb24 100755
--- a/native_client_sdk/src/tools/create_nmf.py
+++ b/native_client_sdk/src/tools/create_nmf.py
@@ -118,7 +118,7 @@ class NmfUtils(object):
def __init__(self, main_files=None, objdump='x86_64-nacl-objdump',
lib_path=None, extra_files=None, lib_prefix=None,
- toolchain=None, remap={}):
+ toolchain=None, remap=None):
'''Constructor
Args:
@@ -142,7 +142,7 @@ class NmfUtils(object):
self.needed = None
self.lib_prefix = lib_prefix or []
self.toolchain = toolchain
- self.remap = remap
+ self.remap = remap or {}
def GleanFromObjdump(self, files):
@@ -203,10 +203,10 @@ class NmfUtils(object):
Returns:
A list of system paths that match the given name within the lib_path'''
files = []
- for dir in self.lib_path:
- file = os.path.join(dir, name)
- if os.path.exists(file):
- files.append(file)
+ for dirname in self.lib_path:
+ filename = os.path.join(dirname, name)
+ if os.path.exists(filename):
+ files.append(filename)
if not files:
raise Error('cannot find library %s' % name)
return files
@@ -227,7 +227,7 @@ class NmfUtils(object):
if runnable:
examined = set()
all_files, unexamined = self.GleanFromObjdump(
- dict([(file, None) for file in self.main_files]))
+ dict([(f, None) for f in self.main_files]))
for name, arch_file in all_files.items():
arch_file.url = name
if unexamined:
@@ -430,7 +430,7 @@ def Main(argv):
toolchain=options.toolchain,
remap=remap)
- manifest = nmf.GetManifest()
+ nmf.GetManifest()
if options.output is None:
sys.stdout.write(nmf.GetJson())
else:
« no previous file with comments | « native_client_sdk/src/examples/httpd.py ('k') | native_client_sdk/src/tools/getos.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698