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

Unified Diff: printing/cups_config_helper.py

Issue 1554383002: Fix failure in printing/BUILD.gn when not using a sysroot. Without this change, gn gen fails with "… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update usage string Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: printing/cups_config_helper.py
diff --git a/printing/cups_config_helper.py b/printing/cups_config_helper.py
index 138a688735a1e0c35919357d3cefd6a44fd2e753..48cb33376e359190b940c8ef4bb4731d1ca6260c 100755
--- a/printing/cups_config_helper.py
+++ b/printing/cups_config_helper.py
@@ -22,8 +22,8 @@ import subprocess
import sys
def usage():
- print 'usage: %s {--api-version|--cflags|--ldflags|--libs|--libs-for-gn}' % \
- sys.argv[0]
+ print ('usage: %s {--api-version|--cflags|--ldflags|--libs|--libs-for-gn} '
+ '[sysroot]' % sys.argv[0])
def run_cups_config(cups_config, mode):
@@ -63,7 +63,7 @@ def main():
return 1
mode = sys.argv[1]
- if len(sys.argv) > 2:
+ if len(sys.argv) > 2 and sys.argv[2]:
sysroot = sys.argv[2]
cups_config = os.path.join(sysroot, 'usr', 'bin', 'cups-config')
if not os.path.exists(cups_config):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698