Skip to content

Commit

Permalink
Merge pull request #346 from Etienne-Gautier/stroke-classId
Browse files Browse the repository at this point in the history
Accept other classId in Stroke constructor
  • Loading branch information
kyamagu authored Dec 20, 2022
2 parents ac1ac5a + 42ed0e2 commit 128d2e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/psd_tools/api/shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import logging

from psd_tools.psd.vector import Subpath, InitialFillRule, ClipboardRecord
from psd_tools.terminology import Event

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -164,7 +165,8 @@ class Stroke(object):

def __init__(self, data):
self._data = data
assert self._data.classID == b'strokeStyle'
if self._data.classID not in (b'strokeStyle', Event.Stroke):
logger.warning("Unknown class ID found: {}".format(self._data.classID))

@property
def enabled(self):
Expand Down

0 comments on commit 128d2e6

Please sign in to comment.