Update openpype/tools/workfiles/window.py

Co-authored-by: Jakub Trllo <43494761+iLLiCiTiT@users.noreply.github.com>
This commit is contained in:
Fabià Serra Arrizabalaga 2023-06-05 15:07:35 +02:00 committed by GitHub
parent c12e6995de
commit 7c70ea968d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -101,11 +101,12 @@ class SidePanelWidget(QtWidgets.QWidget):
# NOTE: we tried adding "win32security" module but it was not working
# on all hosts so we decided to just support Linux until migration
# to Ayon
if platform.system() != "Windows":
import pwd
if platform.system().lower() == "window":
return None
import pwd
filestat = os.stat(file)
return pwd.getpwuid(filestat.st_uid).pw_name
filestat = os.stat(file)
return pwd.getpwuid(filestat.st_uid).pw_name
def set_context(self, asset_id, task_name, filepath, workfile_doc):
# Check if asset, task and file are selected