ubuntu下jupiter报错问题

因为ubuntu的电源管理有问题,致使笔记本风扇老转,又吵又耗电。搜了一通,发现安装jupiter能够解决。 html

个人系统是12.04,jupiter是0.1.9,不过有点小小的问题: python

~$ jupiter
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/bin/jupiter", line 414, in update_screen_resolutions
    res = self.jupiter.get_available_resolutions(display)
  File "/usr/bin/jupiter", line 181, in get_available_resolutions
    return self.get_device('/available_resolutions_' + args,'resolutions','modes ' + args).split(' ')
AttributeError: 'bool' object has no attribute 'split'

Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 504, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/bin/jupiter", line 380, in update_screen_orientations
    rotation = self.jupiter.current_rotation(display)
  File "/usr/bin/jupiter", line 166, in current_rotation
    return self.get_device('/rotation_saved_'+args, 'rotate', ['normal',args]).split(' ')[0]
AttributeError: 'bool' object has no attribute 'split'
再搜了一通误解过,只好调试了一通,发现176行的函数def get_displays(self)返回的值有问题,包含空的元素,而后

update_screen_resolutions、get_available_resolutions、current_rotation等函数就会出错 shell

就把错误的函数: bootstrap

def get_displays(self):
    return self.get_device('/displays','vga-out','mon').split(' ')

改为了: ubuntu

def get_displays(self):
    return filter(None, self.get_device('/displays','vga-out','mon').split(' '))
至于那个filter为何能够去空元素,别问!仍是搜索来的,其实我只是半个伸手党。具体本身看python文档,build-in函数里。
相关文章
相关标签/搜索