예제 #1
0
 def eject(self, udi):
     if util.iscommand("eject"):
         pipe = subprocess.Popen(['eject', self.get_block_device(udi)],
                 stderr=subprocess.PIPE, close_fds=True)
         if pipe.wait() == 0: return True
         else: return pipe.stderr.read()
     else:
         return _("No eject command found.")
예제 #2
0
파일: openwith.py 프로젝트: passy/dotfiles
 def exists(self):
     return util.iscommand(self.command.split()[0])
예제 #3
0
    def test_dir_in_path(self): self.failIf(util.iscommand("X11"))
add(Tiscommand)
예제 #4
0
 def test_symlink(self): self.failUnless(util.iscommand("pidof"))
 def test_dir(self): self.failIf(util.iscommand("/bin"))
예제 #5
0
 def test_dir(self): self.failIf(util.iscommand("/bin"))
 def test_dir_in_path(self): self.failIf(util.iscommand("X11"))
예제 #6
0
 def test_empty(self): self.failIf(util.iscommand(""))
 def test_symlink(self): self.failUnless(util.iscommand("pidof"))
예제 #7
0
 def test_notfull(self): self.failIf(util.iscommand("/bin/zzzzzzzzz"))
 def test_empty(self): self.failIf(util.iscommand(""))
예제 #8
0
 def test_notpartial(self): self.failIf(util.iscommand("zzzzzzzzz"))
 def test_notfull(self): self.failIf(util.iscommand("/bin/zzzzzzzzz"))
예제 #9
0
 def test_isfull(self): self.failUnless(util.iscommand("/bin/ls"))
 def test_notpartial(self): self.failIf(util.iscommand("zzzzzzzzz"))
예제 #10
0
 def test_ispartial(self): self.failUnless(util.iscommand("ls"))
 def test_isfull(self): self.failUnless(util.iscommand("/bin/ls"))