File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -62,11 +62,18 @@ def __init__(self, file_name):
6262 self .__validated_yaml = self .__schema .validate (contents )
6363 except SchemaError as exc :
6464 sys .exit (exc .code )
65- # Write the schema every time we run this code.
66- with open (SCHEMA_FILE , 'w' ) as outfile :
67- str_dict = SchemaManager .__sanitize_value (
68- self .__schema ._schema )
69- yaml .dump (str_dict , outfile )
65+ # Write the schema every time we run this code while developing. We
66+ # don't want to run this when the package is installed as this we won't
67+ # have the permission. This is intended to keep the schema file up to
68+ # date when we add new stuff to it.
69+ try :
70+ with open (SCHEMA_FILE , 'w' ) as outfile :
71+ str_dict = SchemaManager .__sanitize_value (
72+ self .__schema ._schema )
73+ yaml .dump (str_dict , outfile )
74+ except OSError :
75+ log .debug (
76+ "Cannot write schema file. We only use this while developing." )
7077
7178 def __to_simple_list (commented_seq ):
7279 simple_list = []
Original file line number Diff line number Diff line change 66from setuptools import setup
77from setuptools .command .install import install
88
9- VERSION_STRING = '0.0.4 '
9+ VERSION_STRING = '0.0.5 '
1010
1111PACKAGE_NAME = 'ipb_homework_checker'
1212
You can’t perform that action at this time.
0 commit comments