Skip to content

Commit

Permalink
Merge pull request #126 from HEXRD/material-path-fix
Browse files Browse the repository at this point in the history
Use pathlib to get suffix
  • Loading branch information
cjh1 authored Sep 29, 2020
2 parents 48a44a2 + 2b8ba2e commit 5457ffa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hexrd/material.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
import copy

from os import path
from pathlib import Path
from CifFile import ReadCif
import h5py
from warnings import warn
Expand Down Expand Up @@ -142,8 +143,7 @@ def __init__(self, name=None, material_file=None, dmin=DFLT_DMIN, kev=DFLT_KEV,
# >> @ date 08/20/2020 SS removing dependence on hklmax
#self._hklMax = Material.DFLT_SSMAX
# self._beamEnergy = Material.DFLT_KEV
n = material_file.find('.')
form = material_file[n+1:]
form = Path(material_file).suffix[1:]

if(form == 'cif'):
self._readCif(material_file)
Expand Down

0 comments on commit 5457ffa

Please sign in to comment.