mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 03:11:07 +00:00
21 lines
377 B
Python
21 lines
377 B
Python
#coding: UTF-8
|
|
|
|
import platform
|
|
import os
|
|
|
|
def get_platform_name():
|
|
'''Returns current platform the seafile server is running on. Possible return
|
|
values are:
|
|
|
|
- 'linux'
|
|
- 'windows'
|
|
- 'raspberry-pi'
|
|
|
|
'''
|
|
if os.name == 'nt':
|
|
return 'windows'
|
|
elif 'arm' in platform.machine():
|
|
return 'raspberry-pi'
|
|
else:
|
|
return 'linux'
|