1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 03:11:07 +00:00
Files
seahub/seahub/utils/sysinfo.py
2014-04-17 13:40:29 +08:00

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'