Проверка на root только для Linux (в винде не надо) + Fixes #4

This commit is contained in:
Jack Stdin
2016-02-14 16:15:10 +03:00
parent cb1da8dd5f
commit 61435791fc
5 changed files with 25 additions and 8 deletions

View File

@@ -4,6 +4,7 @@ import logging
import optparse
import os
import sys
import platform
from aore.miscutils.sphinx import SphinxHelper
from aore.updater.soapreceiver import SoapReceiver
@@ -115,9 +116,9 @@ def main():
# Manage DB
if options.database:
if not is_root():
if 'Linux' in platform.system() and not is_root():
print "This option need to be run with elevated privileges."
# return
return
# create new database
aoupdater = Updater(options.source)
@@ -134,7 +135,7 @@ def main():
# Manage Sphinx
if options.sphinx and options.indexer_path and options.output_conf:
if not is_root():
if 'Linux' in platform.system() and not is_root():
print "This option need to be run with elevated privileges."
return
sphinxh = SphinxHelper()