# -*- coding: utf-8 -*-  

import os

from PyQt4.QtCore import SIGNAL, QThread


class RestartNetworkThread(QThread):
    def __init__(self, parent=None):
        super(RestartNetworkThread,self).__init__(parent)

        
    def run(self):
        self.emit(SIGNAL("restartNetwork"), "Start")
        ok = os.system("service network restart")
        if ok != 0:
            self.emit(SIGNAL("restartNetwork"), "Failed")
        else:
            self.emit(SIGNAL("restartNetwork"), "Success")
        
        