Skip to content

Commit

Permalink
Merge pull request #181 from dstansby/fix-major
Browse files Browse the repository at this point in the history
Fix default major
  • Loading branch information
dstansby committed May 22, 2023
2 parents 49c226d + d4d17ad commit deedfbc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cdflib/cdfwrite.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ def __init__(self, path, cdf_spec=None, delete=False):

major = 1
if cdf_spec is not None:
major = cdf_spec.get('Majority', 'column_major')
major = cdf_spec.get('Majority', major)
if (isinstance(major, str)):
major = self._majority_token(major)

Expand All @@ -208,8 +208,8 @@ def __init__(self, path, cdf_spec=None, delete=False):
num_rdim = 0
rdim_sizes = None

if (major < 1 or major > 2):
raise OSError('Bad major.')
if major not in [1, 2]:
raise RuntimeError(f'Bad major: {major}')

osSystem = pf.system()
osMachine = pf.uname()[5]
Expand Down

0 comments on commit deedfbc

Please sign in to comment.