Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4679628

Browse files
author
Julian Locke
committed
Address pr comments
1 parent fbf621f commit 4679628

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

‎generate_base_client.py‎

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@
99
import subprocess
1010
import sys
1111

12+
def dir_path(string):
13+
if os.path.isdir(string):
14+
return string
15+
else:
16+
raise NotADirectoryError(string)
17+
1218
cmdline_desc = """\
1319
Runs Stone to generate Obj-C types and client for the Dropbox client.
1420
"""
@@ -53,8 +59,8 @@
5359
)
5460
_cmdline_parser.add_argument(
5561
'-fs',
56-
'--format-script-dir',
57-
type=str,
62+
'--format-script-path',
63+
type=dir_path,
5864
help='Path to format script directory.',
5965
)
6066
_cmdline_parser.add_argument(
@@ -94,7 +100,7 @@ def main():
94100
os.path.abspath('Source/ObjectiveDropboxOfficial/Shared/Generated')
95101
dropbox_pkg_path = args.output_path if args.output_path else dropbox_default_output_path
96102

97-
dropbox_format_script_dir = args.format_script_dir if args.format_script_dir else \
103+
dropbox_format_script_path = args.format_script_path if args.format_script_path else \
98104
os.path.abspath('Format')
99105

100106
dropbox_format_output_path = args.format_output_path if args.format_output_path else dropbox_src_path
@@ -166,7 +172,7 @@ def main():
166172
print('Formatting source files')
167173

168174
cmd = ['./format_files.sh', dropbox_format_output_path]
169-
o = subprocess.check_output(cmd, cwd=dropbox_format_script_dir)
175+
o = subprocess.check_output(cmd, cwd=dropbox_format_script_path)
170176
if o:
171177
print('Output:', o)
172178

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /